package io;

import java.io.*;

/**
 * @Classname: OISDemo
 * @Author: bromide
 * @CreateTime: 2022/3/29--11:27
 * @Version: V1.0
 * @Desciption: 使用对象输入流进行对象的反序列化
 */
public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("person.obj");
        ObjectInputStream oos = new ObjectInputStream(fis);
        Person person = (Person) oos.readObject();
        System.out.println(person.toString());
        oos.close();
    }
}
